import { useState } from 'react'
import { Routes, Route, Link } from 'react-router-dom'
import About from './About'
import Home from './Home'

function App() {

  return (
    <div className="App">
      {/* 路由配置 hashChange*/}
      <nav>
        <Link to='/'>首页</Link>
        <Link to='/about'>关于</Link>
      </nav>
      <Routes>
        {/* 关于
        首页
        详情页 */}
        <Route path='/' element={<Home />} />
        <Route path='/about' element={<About />} />

      </Routes>
    </div>
  )
}

export default App
